<template>
	<uni-popup ref="popup" type="bottom">
		<view class="popup-layout">
			<view class="title-row">
				<view>选择服务门店</view>
				<image :src="asserts.ic_close" @click="cancelClick"></image>
			</view>
			<common-list-view class="list-view" :enableLoadMore="false" :enableRefresh="false">
				<template #content>
					<assistant-store-item v-for="(item, index) in pollHallListData" :itemData="item" @storeClick="storeClick(item)"></assistant-store-item>
				</template>
			</common-list-view>
		</view>
	</uni-popup>
</template>

<script>
	export default {
		data() {
			return {
				pollHallListData: [],
			}
		},
		methods: {
			//显示弹窗
			show() {
				this.$refs.popup.open()
				this.requestCenter.getPollHallList().then(res => {
					this.pollHallListData = res
				})
			},
			
			//item点击
			itemClick(item){
				item.isChecked = !item.isChecked
			},
			
			//点击取消
			cancelClick(){
				this.$refs.popup.close()
			},
			
			//门店点击
			storeClick(item){
				this.$emit('storeInfoSelectBack', {data: item})
				this.cancelClick()
			}
			
		}
	}
</script>

<style scoped lang="less">
	.popup-layout{
		width: 100%;
		height: 800rpx;
		background-color: white;
		border-radius: 32rpx 32rpx 0rpx 0rpx;
		display: flex;
		flex-direction: column;
	}
	.title-row{
		width: 100%;
		height: 100rpx;
		line-height: 100rpx;
		text-align: center;
		font-size: 32rpx;
		color: #021624;
		position: relative;
		font-weight: 500;
		image{
			position: absolute;
			right: 66rpx;
			top: 26rpx;
			width: 48rpx;
			height: 48rpx;
		}
	}
	.list-view{
		flex: 1;
		overflow: hidden;
		background-color: #F9F9F9;
	}
</style>
